namespace WL.Think.Abp.Dto;

/// <summary>
/// 分类基础DTO
/// </summary>
/// <typeparam name="TCategoryDto"></typeparam>
public abstract class BaseCategoryDto<TCategoryDto>: BaseEntityDto where TCategoryDto : BaseCategoryDto<TCategoryDto>
{
    /// <summary>
    /// 分类名称
    /// </summary>
    public string? Name { get; set; }

    /// <summary>
    /// 上级分类ID
    /// </summary>
    public Guid? ParentId { get; set; }

    /// <summary>
    /// 是否启用此分类
    /// </summary>
    public bool IsActive { get; set; }

    /// <summary>
    /// 分类描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 序号
    /// </summary>
    public int Index { get; set; }

    /// <summary>
    /// 路径
    /// </summary>
    public string Path { get; set; }

    /// <summary>
    /// 层级
    /// </summary>
    public int Level { get; set; }

    /// <summary>
    /// 根节点
    /// </summary>
    public bool IsRoot { get; set; }

    /// <summary>
    /// 叶子节点
    /// </summary>
    public bool IsLeaf { get; set; }

    /// <summary>
    /// 子分类列表
    /// </summary>
    public List<TCategoryDto> Children { get; set; } = [];
}
